#include<iostream>
#include<cstring>
#include<string>
#include<vector>
#include<math.h>

using std::cin;
using std::cout;
using std::vector;
using std::endl;

struct point {
    double x, y;
};

double length(point a, point b) {
    return (sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)));
}

template< typename T1, typename T2>
void Input(vector<T1> &v, vector<vector<T2>> &g) {
    size_t n;
    cin >> n;
    double k;
    cin >> k;
    g.resize(n);

    for (size_t i = 0; i < n; ++i) {
        point next;
        cin >> next.x >> next.y;
        v.push_back(next);
    }
    for (size_t i = 0; i < n; ++i) {
        for (size_t j = 0; j < n; ++j) {
            if (i != j && length(v[i], v[j]) <= k)
                g[i].push_back(j);
        }
    }
}

template<typename T1, typename T2>
void Dfs(T1 v, const vector<vector<T1>> &g, vector<T2> &used) {
    used[v] = 1;
    for (int i = 0; i < g[v].size(); ++i) {
        if (!used[g[v][i]]) {
            Dfs(g[v][i], g, used);
        }
    }
}

template<typename T>
void Solve(vector<vector<T>> &g) {
    vector<int> used;
    used.resize(g.size(), 0);

    Dfs(0, g, used);

    for (size_t i = 1; i < g.size(); ++i) {
        if (!used[i]) {
            cout << "NO";
            return;
        }
    }
    cout << "YES";
}


int main() {
    vector<point> v;
    vector<vector<int>> g;
    Input(v, g);
    Solve(g);
}